﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using STLGROUP.Layers.Base;
using STLGROUP.Layers.DataAccessLayers;

namespace STLGROUP.Layers.BLL
{
    public class DT_NhaCungCapBLL : BaseBLL
    {
        public string GetNewMaNCC(int IDNhaCungCap)
        {
            return "NCC" + IDNhaCungCap.ToString().PadLeft(3, '0');
        }

        public void UpdateNhaCungCap(IQueryable<DT_NhaCungCap> data)
        {
            if (data != null)
            {
                foreach (DT_NhaCungCap item in data)
                {
                    //if(item.TrackingState== 
                    item.MaNhaCungCap = GetNewMaNCC(item.IDNhaCungCap);
                }
                //return this.Context.SaveChanges();
            }
            //return -1;
        }
    }
}
